Skip to content

Comments

build: fix npm publish warnings#7

Merged
brian-smith-tcril merged 1 commit intoopenedx:mainfrom
brian-smith-tcril:bsmith/fix-bin-paths-and-enable-release
Feb 13, 2026
Merged

build: fix npm publish warnings#7
brian-smith-tcril merged 1 commit intoopenedx:mainfrom
brian-smith-tcril:bsmith/fix-bin-paths-and-enable-release

Conversation

@brian-smith-tcril
Copy link
Contributor

Summary

  • Remove ./ prefix from bin paths in package.json to fix npm 11.x stripping them during publish
  • Add .npmignore to explicitly control published files (excludes .github/, .releaserc, catalog-info.yaml, etc.)
  • Add *.tgz to .gitignore to keep packed tarballs out of the repo

Test plan

  • npm publish --dry-run --tag prerelease shows no warnings and only 9 expected files
  • Install from packed tarball and verify bin scripts work

Log

frontend-dev-utils Fix npm publish - Work Log

Date: 2026-02-13

Objective

Fix all npm publish warnings and errors so the package publishes cleanly.


Issues Found

1. Bin paths stripped (fixed)

npm publish on npm 11.x strips bin entries with ./ prefix:

"bin[devutils-dev-with-autoinstall]" script name tools/autoinstall/dev-with-autoinstall.mjs was invalid and removed

Fix: Remove ./ prefix from bin paths in package.json (via npm pkg fix).
Verified: Packed tarball installed successfully and bin scripts worked as expected.

2. No .npmignore

npm warn gitignore-fallback No .npmignore file found, using .gitignore for file exclusion.

Results in .github/ workflows, .releaserc, .nvmrc, catalog-info.yaml etc. being included in the published tarball.

Fix: Create .npmignore to explicitly control published files.

3. Stale tarballs in repo

*.tgz files from npm pack were not gitignored.

Fix: Add *.tgz to both .gitignore and .npmignore.

4. Verified clean publish

After all fixes, npm publish --dry-run --tag prerelease produces zero warnings — 9 files, 15.3 kB:

  • LICENSE, README.md, package.json
  • tools/autoinstall/ (4 files)
  • tools/serveconfig/ (2 files)

Installed tarball tested and confirmed working.

Status

  • Branch: bsmith/fix-bin-paths-and-enable-release
  • Commit: 826106fbuild: fix npm publish warnings

🤖 Generated with Claude Code

Remove ./ prefix from bin paths to fix npm 11.x stripping them during
publish. Add .npmignore to control published files and .gitignore *.tgz
to keep packed tarballs out of the repo.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@arbrandes arbrandes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏼

@brian-smith-tcril brian-smith-tcril merged commit 572bc8c into openedx:main Feb 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants